<?php
class Admin_Models_UserAdminModel extends Zend_Db_Table {
	protected $_name = "user_admin";
	protected $_id = "id";
	function getAllUserList(){
		$db = Zend_Registry::get('connectDB');
		$mySql = $db->select()
					->from(array('u' => 'user_admin'),array('id','username'))
					->where("status = 1");
		$user_list = $db->fetchAll($mySql);
		return $user_list;
	}	
        function checkExistAcount($email){
            $db = Zend_Registry::get('connectDB');
            $mySql = $db->select()->from('user',array('UserID','email'))->where("email ='".$email."'");
//            echo $mySql;
//            die;
            $result=$db->fetchAll($mySql);
            return $result;
        }
        function loaduserid($username){
            $db = Zend_Registry::get('connectDB');
            $mySql = $db->select()->from($this->_name,array('UserID','username'))->where("Username ='".$username."'");
//            echo $mySql;
//            die;
            $result=$db->fetchAll($mySql);
            return $result;
        }
}